package com.lichuang.fruitvarietysm.goods.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;


/**
 * 分类表跟属性表之间的数据库映射的类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Category对象", description = "分类表")
public class CategoryAttributeDTE implements Serializable {
    @ApiModelProperty(value = "类别id")
    @TableId(value = "category_id", type = IdType.AUTO)
    private Integer categoryId;

    @ApiModelProperty(value = "夫类别id，当id=0时说明是根节点，一级类别")
    private Integer parentId;

    @ApiModelProperty(value = "类别名称")
    private String categoryName;

    @ApiModelProperty(value = "对应abbribute表里的attribute_id")
    private Integer attributeId;

    @ApiModelProperty(value = "属性表和值")
    private String attributeName;

    @ApiModelProperty(value = "属性的父id")
    private Integer pid;

    @ApiModelProperty(value = "递归查询")
    private Set<CategoryAttributeDTE> categoryAttributeDTES=new HashSet<CategoryAttributeDTE>();

}
